/*
 * addlinkdialog.h
 *
 *  Created on: 5.3.2010
 *      Author: aahv
 */

#ifndef ADDLINKDIALOG_H
#define ADDLINKDIALOG_H

#include <QDialog>

class QUrl;

namespace Ui {
    class AddLinkDialog;
}

class AddLinkDialog : public QDialog {
    Q_OBJECT
public:
    AddLinkDialog(QWidget *parent = 0);
    ~AddLinkDialog();

    void setFocus();
    
protected:
    void changeEvent(QEvent *e);
    void keyPressEvent(QKeyEvent * event );

signals:
    void showErrorNote(const QString& aError);
    void addLink(const QString& title, const QUrl& link);

private slots:
    void onOk();
    void onCancel();

private:
    void clear();

    Ui::AddLinkDialog *ui;
};

#endif // ADDLINKDIALOG_H
